<{include file="common/header.tpl"}>
<section id="spread_one" class="column">
        <{if $public_notice}>
		<h4 class="alert_info"><{$public_notice}></h4>
        <{/if}>
		<div style="height:30px;width:800px;text-indent:30px;line-height:30px">
			X轴:时间  &nbsp;&nbsp; Y轴:推广数据
		</div>
		<canvas id="canvas" height="200" width="800">
		</canvas>
        <article class="module width_3_quarter">
        <header>
            <{include file="effect/filter.tpl"}>
        </header>
		<div class="tab_container">
			<div id="tab1" class="tab_content">
			<table class="tablesorter" cellspacing="0"> 
			<thead> 
				<tr> 
   					
    				<th>日期</th> 
					<{if $user_info.role_id == 'commonmanager' || $user_info.role_id == 'supermanager'}>
						<th>项目主管</th>
                    <{/if}>
					<th>推广活动</th>
					<th>渠道名称</th>
    				<th>推广数据</th> 
                    <{if $user_info.role_id == 'commonmanager' || $user_info.role_id == 'supermanager'}>
                        <th>实际数据</th>
                    <{/if}>
    				<th>计费单价</th> 
    				<th>计费标准</th> 
					 <{if $user_info.role_id == 'commonmanager' || $user_info.role_id == 'supermanager'}>
					    <th>操作</th>
				     <{/if}>
				</tr> 
			</thead> 
			<tbody>
				<{foreach from =$list item ='v' name="rs_list"}> 
                    <{if $v.activity_info.pay_type == 'CPS'}>
					<tr>
						<td><{$v.day}></td>
						<{if $user_info.role_id == 'commonmanager' || $user_info.role_id == 'supermanager'}>
							<td><{$manager_name}></td>
						<{/if}>
						<td><{if $isActivity}><{$v.activity_info.name}><{else}>全部活动</td><{/if}>
						<{if $isChannel}><td><{$v.channel_info.name}></td><{else}><td>全部渠道</td><{/if}>
						<td>￥<{$v.counts/100|number_format:2}></td>
                        <{if $user_info.role_id == 'commonmanager' || $user_info.role_id == 'supermanager'}>
                            <td>￥<{$v.real_counts/100|number_format:2}></td>
                        <{/if}>
						<{if $isActivity}><td><{$v.activity_info.price}>%</td><{else}><td>全部</td><{/if}>
						<td>收益分成</td>
					</tr> 
    
                    <{else}>
					<tr>
						<td><{$v.day}></td>
						<{if $user_info.role_id == 'commonmanager' || $user_info.role_id == 'supermanager'}>
							<td><{$manager_name}></td>
						<{/if}>
						<td><{if $isActivity}><{$v.activity_info.name}><{else}>全部活动</td><{/if}>
						<{if $isChannel}><td><{$v.channel_info.name}></td><{else}><td>全部渠道</td><{/if}>
						<td><{$v.counts}></td>
                        <{if $user_info.role_id == 'commonmanager' || $user_info.role_id == 'supermanager'}>
                            <td><{$v.real_counts}></td>
                        <{/if}>
						<{if $isActivity}><td>￥<{$v.activity_info.price/100|number_format:2}></td><{else}><td>全部</td><{/if}>
						<{if $isActivity}><td><{if $v.activity_info.pay_param == 'newbie'}>激活<{else}>下载<{/if}></td><{else}><td>全部</td><{/if}>
						
                        <{if $user_info.role_id == 'commonmanager' || $user_info.role_id == 'supermanager'}>
							<td><a href="/channel/edit_ratio/<{$v.activity_id}>/<{$v.channel_id}>">调系数</a></td>
                        <{/if}>
					</tr> 
                    <{/if}>

                    <{if $smarty.foreach.rs_list.last}>
					<tr>
						<td>汇总</td>
						<{if $isActivity}><td>&nbsp;</td><{/if}>
						<{if $isActivity && $user_info.role_id == 'supermanager'}><td>&nbsp;</td><{/if}>
						<{if !$isActivity && !$isChannel && $user_info.role_id == 'supermanager' || $user_info.role_id == 'commonmanager'}><td>&nbsp;</td><td>&nbsp;</td><{/if}>
						<{if  $user_info.role_id != 'commonmanager'}>
						<td>&nbsp;</td>
						<{/if}>
						<{if  $user_info.role_id == 'commonmanager' && !$isActivity && !$isChannel}>
						<td>&nbsp;</td>
						<{/if}>
						<td><{$summary.counts}></td>
                        <{if $user_info.role_id == 'commonmanager' || $user_info.role_id == 'supermanager'}>
                            <td><{$summary.real_counts}></td>
                        <{/if}>
						<{if $isActivity}><td>&nbsp;</td><{/if}>
						<{if $isActivity}><td>&nbsp;</td><{/if}>
					</tr> 
                    <{/if}>


				<{/foreach}>
			</tbody> 
			</table>
			</div><!-- end of #tab1 -->
		</div><!-- end of .tab_container -->
		</article><!-- end of content manager article -->
		<div class="clear"></div>
	</section>			
	<script>

            var lineChartData = {
                labels : <{$date_list}> ,
                datasets : [
                {
            		fillColor : "rgba(151,187,205,0.5)",
                    strokeColor : "rgba(151,187,205,1)",
                    pointColor : "rgba(151,187,205,1)",
                    pointStrokeColor : "#fff",
                    data : <{$counts}>
                }
                ],
            }
            var myLine = new Chart(document.getElementById("canvas").getContext("2d")).Line(lineChartData);
        </script>
<{include file="common/footer.tpl"}>
